(shell-command): Don't activate mark even momentarily.
authorRichard M. Stallman <rms@gnu.org>
Mon, 24 May 1993 18:46:13 +0000 (18:46 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 24 May 1993 18:46:13 +0000 (18:46 +0000)
lisp/simple.el

index f5184105361ff85efd1fd7188998d18d554dab21..729685ddaed1b266bd8f02654b494673b35f0c4c 100644 (file)
@@ -648,7 +648,12 @@ This cannot be done asynchronously."
             ;; aliases for shell commands then they can still have them.
             (call-process shell-file-name nil t nil
                           "-c" command)
-            (exchange-point-and-mark))
+            ;; This is like exchange-point-and-mark, but doesn't activate the mark.
+            ;; It is cleaner to avoid activation, even though the command
+            ;; loop would deactivate the mark because we inserted text.
+            (goto-char (prog1 (mark t)
+                         (set-marker (mark-marker) (point)
+                                     (current-buffer)))))
     ;; Preserve the match data in case called from a program.
     (let ((data (match-data)))
       (unwind-protect